package o.mrs;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class MainMenu extends Activity {
	private Button addUsrButton;
	private Button findPersonButton;
	private Button listPersonButton;
	@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.menu);
        
        this.addUsrButton = (Button) findViewById(R.id.addButton);
        this.findPersonButton = (Button) findViewById(R.id.findButton);
        this.listPersonButton = (Button) findViewById(R.id.listButto);
        
        
       listPersonButton.setOnClickListener(new OnClickListener() {
		
		public void onClick(View v) {
			Intent i = new Intent();
			i.setClass(getApplicationContext(), ListPersons.class);					
			startActivity(i);
		}
       });
       
       findPersonButton.setOnClickListener(new OnClickListener() {
		
		public void onClick(View v) {
			Intent i = new Intent();
			i.setClass(getApplicationContext(), FindPerson.class);					
			startActivity(i);
			
		}
	});
        
        addUsrButton.setOnClickListener(new OnClickListener() {
			
			public void onClick(View v) {
				Intent i = new Intent();
				i.setClass(getApplicationContext(), AddPatient.class);					
				startActivity(i);
				
			}
		});
    }
	
	
}
